import AnswerBase from "./answerBase";
import AnswerByDoc from "./answerByDoc";
import AnswerByIdp from "./answerByIdp";

/**
 * 基于 ES6 模块化技术
 * @param {*} param 
 * @returns 
 */
export default function answerSwitch(param){
  switch(param.type){
    case "doc": return new AnswerByDoc(param);
    case "idp": return new AnswerByIdp(param);
  }
  return new AnswerBase(param);

}
